# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=perl-ref-util-xs
pkgver=0.117
pkgrel=2
pkgdesc="XS implementation for Ref::Util"
arch=('loong64' 'x86_64')
license=('PerlArtistic')
url="https://metacpan.org/release/Ref-Util-XS"
depends=('perl')
checkdepends=('perl-readonly')
options=('!emptydirs')
source=("https://cpan.metacpan.org/authors/id/X/XS/XSAWYERX/Ref-Util-XS-$pkgver.tar.gz")
sha512sums=('5ebcd1bfd6c4b94c17f24c890342d4fba74a7a7c09b3d338208cd5d3fe6b6dd2c504c86ab555c27781b5ede2633d012bb7df819029ce89bec6bc269e21d567a0')

build() {
  cd Ref-Util-XS-$pkgver
  perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd Ref-Util-XS-$pkgver
  make test
}

package() {
  cd Ref-Util-XS-$pkgver
  make DESTDIR="$pkgdir" install
}
